package com.slz3.business.module.configManagement.conSiteCity.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCity;
import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCityCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCityResController {

    static Mono<ServerResponse> add(ServerRequest req, ConSiteCity conSiteCity) {
        if (ConSiteCityResUnsafeValid.add(req, conSiteCity)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.add_$ConSiteCityUpdateLock(req, conSiteCity);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        if (ConSiteCityResUnsafeValid.delete(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.delete_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConSiteCity conSiteCity) {
        if (ConSiteCityResUnsafeValid.modify(req, conSiteCity)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.modify_$ConSiteCityUpdateLock(req, conSiteCity);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConSiteCityResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConSiteCityResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.info_$ConSiteCityUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConSiteCityResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        //
        if (ConSiteCityResUnsafeValid.auditSubmit(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.auditSubmit_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        if (ConSiteCityResUnsafeValid.audit(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.audit_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        if (ConSiteCityResUnsafeValid.auditReject(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.auditReject_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        if (ConSiteCityResUnsafeValid.usingEnable(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.usingEnable_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        if (ConSiteCityResUnsafeValid.usingDisable(req, conSiteCityCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteCityResAtomic.usingDisable_$ConSiteCityUpdateLock(req, conSiteCityCondition);
        }
    }

}
